package com.gitee.kenewstar.controller;

import com.gitee.kenewstar.bean.VcuResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 使用注解 (局部跨域)
 * @author kenewstar
 * @date 2021/6/9
 */
@RestController
@RequestMapping("/vcu")
@CrossOrigin(value = "*")
public class VcuController {

    @GetMapping("/test")
    public VcuResult test() {
        return VcuResult.success();
    }

    @GetMapping("/test2")
    public VcuResult test2() {
        return VcuResult.success("Hello World Webhooks");
    }


}
